package com.codejoys.monitor.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.util.HashMap;
import java.util.Map;

@Configuration
@PropertySource("classpath:application.properties")
@ConfigurationProperties(prefix = "monitor.modbus")
public class SysConfig {
    private int moduleHeartbeat = 5;

    // 设备数据读取频率
    private int deviceDataReadRate;

    // 扫描设备老化过期的频率
    private int checkExpiredDevicesRate;

    public int getModuleHeartbeat() {
        return moduleHeartbeat;
    }

    public void setModuleHeartbeat(int moduleHeartbeat) {
        this.moduleHeartbeat = moduleHeartbeat;
    }

    public int getDeviceDataReadRate() {
        return deviceDataReadRate;
    }

    public void setDeviceDataReadRate(int deviceDataReadRate) {
        this.deviceDataReadRate = deviceDataReadRate;
    }

    public int getCheckExpiredDevicesRate() {
        return checkExpiredDevicesRate;
    }

    public void setCheckExpiredDevicesRate(int checkExpiredDevicesRate) {
        this.checkExpiredDevicesRate = checkExpiredDevicesRate;
    }
}
